<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
* {
    margin: 0px;
    border: 0px;
    padding: 0px;
}
#a1 {
    width: 100%;
    height: 100%;
    position: relative;
}
.a1-1 {
    width: 100%;
    height: 100px;
    background-color: red;
}
.a1-2 {
    width: 100%;
    height: 600px;
}
.a1-3 {
    width: 100%;
    height: 600px;
}
.a1-4 {
    width: 300px;
    height: 200px;
    border: 1px red solid;
    box-sizing: border-box;
    position: fixed;
    top: 300px;
    left: 50%;
    z-index: 200;
    margin-left: -150px;
}
.a1-4-1 {
    width: 100%;
    height: 20px;
    background-color: green;
}
.a1-4-2 {
    width: 100%;
    height: 180px;
    background-color: gold;
}
/* 遮罩层 */
.a1-5 {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    opacity: 0.5;
    background-color: rgb(8, 8, 8);
}
</style>
<body>
    <div id="a1">
        <div class="a1-1">导航栏</div>
        <div class="a1-2">页面1</div>
        <div class="a1-3">页面2</div>
        <div class="a1-4">
            <div class="a1-4-1"><h5>标题</h5></div>
            <div class="a1-4-2"></div>
        </div>
        <div class="a1-5"></div>
    </div>
</body>
</html>